Skip to content

feat(r8): Add line span expansion and outside-range fallback#86

Merged
romtsn merged 2 commits intorz/feat/r8-tests-line-number-handlingfrom
rz/fix/r8-tests-span-and-fallback
Feb 16, 2026
Merged

feat(r8): Add line span expansion and outside-range fallback#86
romtsn merged 2 commits intorz/feat/r8-tests-line-number-handlingfrom
rz/fix/r8-tests-span-and-fallback

Conversation

@romtsn
Copy link
Copy Markdown
Member

@romtsn romtsn commented Feb 9, 2026

Summary

  • When a base entry (no minified range) maps to a span of original lines (e.g., :42:44), expand into one frame per original line instead of just the first
  • When a frame's line number falls outside all mapped member ranges, fall back to class-only remapping (keeping the obfuscated method name and original line)
  • Adds matched_any tracking in cache iterator to prevent false fallback triggers after successful matches

Fixes test_different_line_number_span_stacktrace and test_outside_line_range_stacktrace.

Test plan

  • All existing tests pass (50 lib + all integration tests)
  • test_different_line_number_span_stacktrace now passes (was failing: 1 frame instead of 3)
  • test_outside_line_range_stacktrace now passes (was failing: unremapped frame instead of class-only remap)
  • Only remaining failure is test_single_line_no_line_number_stacktrace (Group F — ordering)
  • make format and make lint pass

🤖 Generated with Claude Code

@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch 2 times, most recently from 92b293d to a2ff34c Compare February 9, 2026 16:18
@romtsn romtsn requested a review from loewenheim February 9, 2026 16:32
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch from d5292dc to 726accb Compare February 10, 2026 09:55
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch from a2ff34c to b1ce9ec Compare February 10, 2026 09:55
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch from 726accb to 9672efd Compare February 10, 2026 12:28
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch 2 times, most recently from 9db871a to 86ca9fb Compare February 10, 2026 12:45
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch from 9672efd to bc97cdb Compare February 10, 2026 12:45
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch from 86ca9fb to b692685 Compare February 10, 2026 17:31
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch from b692685 to b9b4841 Compare February 13, 2026 16:35
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch from ecdc202 to dfa197a Compare February 13, 2026 16:44
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch from b9b4841 to 62ed8da Compare February 13, 2026 16:45
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch from dfa197a to 58326db Compare February 13, 2026 16:54
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch from 62ed8da to 0af8489 Compare February 13, 2026 16:54
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch from 58326db to 0007c72 Compare February 13, 2026 17:04
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch from 0af8489 to 1951c06 Compare February 16, 2026 09:35
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch from 0007c72 to a9ec960 Compare February 16, 2026 12:43
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch 2 times, most recently from d1a627a to 352028f Compare February 16, 2026 12:51
Base automatically changed from rz/fix/r8-tests-no-line-resolution to rz/feat/r8-tests-line-number-handling February 16, 2026 13:00
When a base entry maps to a span of original lines (e.g., `:42:44`),
expand into one frame per original line. When a frame's line falls
outside all mapped ranges, fall back to class-only remapping.

Fixes test_different_line_number_span_stacktrace and
test_outside_line_range_stacktrace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch from 352028f to b4acde2 Compare February 16, 2026 13:02
Prevents excessive iteration from malformed mapping files where the
original line range could be extremely large (up to u32::MAX).  The JVM
bytecode maximum line number is 65535, so any span beyond that is
invalid and falls through to single-line handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@romtsn romtsn force-pushed the rz/fix/r8-tests-span-and-fallback branch from 74b317e to ea0879b Compare February 16, 2026 13:22
@romtsn romtsn merged commit fbb94bf into rz/feat/r8-tests-line-number-handling Feb 16, 2026
4 of 6 checks passed
@romtsn romtsn deleted the rz/fix/r8-tests-span-and-fallback branch February 16, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants